package com.example.tianyidemo.Mapper;
import com.example.tianyidemo.pojo.Comment;
import com.example.tianyidemo.pojo.Post;
import com.example.tianyidemo.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface PostMapper {
    @Select("select * from post")
    List<Post> getPost();
    @Select("SELECT * FROM user WHERE userID = #{postUserID}")
    List<User> getPostId(@Param("postUserID") Integer postUserID);
    @Select("select * from comment where commentsPostID=#{postCommentID}")
    List<Comment> getComment(@Param("postCommentID") Integer postCommentID);


}
